Make process_all_updates draw synchronously
authorAlexander Larsson <alexl@redhat.com>
Mon, 1 Oct 2012 08:02:01 +0000 (10:02 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 2 Oct 2012 11:12:49 +0000 (13:12 +0200)
commit83c66c9c2cf6bf411f7d5ae3c89259203626173a
tree9f6847386440ffd499c9a709632ef49e3cc3aeb7
parentd6809d050a8666f7c98ee4b74f22ff828782fe16
Make process_all_updates draw synchronously

By calling XSync in _gdk_x11_display_after_process_all_updates we
effectively make gdk rendering sync, which avoids problems with the
client animations running faster than the Xserver rendering, thus
filling up the X rendering pipes and essentially "locking up" the
Xserver (i.e. you can't even close the offending window because the
WM is starved too).

I verified this worked by making GtkSpinner paint multiple times on my
intel driver (which has some issue making this rendering slow atm),
and without this patch i get severe lag where even window dragging
stops for 5 seconds when i drag the mouse around. However, with the
patch everything is smooth.

https://bugzilla.gnome.org/show_bug.cgi?id=684639
gdk/x11/gdkwindow-x11.c